/**
 * Created by Administrator on 2016/7/26.
 */
swan_pc
    .factory("friendManageUpdate",function($resource){
        return $resource("api/friendPermissions/:fpid",{fpid:"@fpid"},{
            'update':{
                method:"PUT"
            }
        })
    })
    .factory("getMyFriendById",function($resource){
        return $resource("api/friendPermissions/:fpid",{fpid:"@fpid"}, {
            'query':{
                method:"GET"
            },
            'delete':{
                method:"DELETE"
            }
        })
    })
    .factory("friendManage",function($resource){
        return $resource("api/friendPermissions",{
            'update': {
                method:'PUT',
                transformRequest: function (data) {
                    return angular.toJson(data);
                }
            },
            'save':{
                method:'POST'
            },
            'query':{
                method:'GET'
            }
        })
    })
    .factory("getUserByLogin",function($resource){
        return $resource("api/users/:login",{login:"@login"},{
            'get':{
                method:"GET"
            }
        })
    })